package com.kizuki.spring;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

@Component
//@Repository //dao 3种标识组件
//@Service // service
//@Controller // controller
public class AnnotationAutoBean {

    // value
    @Value("lixiaojian")
    private String name;

    // ref
    @Autowired
    @Qualifier("annotationr0")
    private AutoBeanRef0 r0;

    @Autowired
    @Qualifier("annotationr1")
    private AutoBeanRef1 r1;

    @Override
    public String toString() {
        return "AnnotationAutoBean{" +
                "name='" + name + '\'' +
                ", r0=" + r0 +
                ", r1=" + r1 +
                '}';
    }
}
